/**
 * Created by Administrator on 2016/12/6.
 */
import {NgModule}             from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {LoginComponent} from "./modules/site/component/login/login.component";
import {ConsoleComponent} from "./modules/site/component/console/console.component";
import {TestComponent} from "./modules/site/component/test/test.component";
import {UserListComponent} from "./modules/user/component/userList/userList.component";
import {RoleListComponent} from "./modules/user/component/roleList/roleList.component";


const appRoutes: Routes = [
    {path: 'login', component: LoginComponent},
    {path: '', redirectTo: 'login', pathMatch: 'full'},
    {
        path: 'console', component: ConsoleComponent, children: [
        {path: 'index', redirectTo: 'user/list', pathMatch: 'full'},
        {path: 'user/list', component: UserListComponent},
        {path: 'role/list', component: RoleListComponent},
        {path: 'test', component: TestComponent}
    ]
    },
];

@NgModule({
    imports: [
        RouterModule.forRoot(appRoutes)
    ],
    exports: [
        RouterModule
    ]
})
export class AppRoutingModule {
}